/*
 * Copyright (c) 2018, apexes.net. All rights reserved.
 *
 *         http://www.apexes.net
 *
 */
package net.apexes.commons.lang;

import java.util.Arrays;

/**
 * @author <a href=mailto:hedyn@foxmail.com>HeDYn</a>
 */
public class Base32Demo {

    public static void main(String[] args) {
        test(8);
        test(16);
        test(24);
        test(32);
        test(64);
    }

    private static void test(int len) {
        for (int i = 0; i < 3; i++) {
            test(Base62Demo.random(len));
        }
    }

    private static void test(byte[] bytes) {
        String encode = Base32.encode(bytes);
        System.out.println(Arrays.equals(bytes, Base32.decode(encode)) + " | " + encode + " | " + bytes.length + " -> " + encode.length());
    }

}
